HTMLify

style.css
Views: 35 | Author: cody
body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #151515;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.burger {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 99;
    height: auto;
}

.burger input {
    display: block;
    cursor: pointer;
    position: absolute;
    height: 40px;
    width: 40px;
    opacity: 0;
    z-index: 9;
}

.burger span {
    width: 35px;
    height: 3px;
    background: #4e4e4e;
    position: relative;
    display: block;
    margin: 4px 0;
    border-radius: 2px;
    transition: all 0.2s linear;
}

.menu-btn-one input:checked~span:nth-child(2) {
    opacity: 1;
    transform: rotate(-45deg) translate(-6px, 5px);
    background: #eb30ba;
    box-shadow: 0 0 2em 0.2em #eb30ba;
}

.menu-btn-one input:checked~span:nth-child(3) {
    opacity: 0;
}

.menu-btn-one input:checked~span:nth-child(4) {
    display: block;
    transform: rotate(135deg);
    opacity: 1;
    margin-top: -3px;
    width: 35px;
    transform: rotate(45deg) translate(-5px, -5px);
    background: #eb30ba;
    box-shadow: 0 0 2em 0.2em #eb30ba;
}

.menu-btn-two input:checked~span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.menu-btn-two input:checked~span:nth-child(3) {
    transform: rotate(45deg);
    width: 35px;
    background: #29cda7;
    box-shadow: 0 0 2em 0.2em #29cda7;
}

.menu-btn-two input:checked~span:nth-child(4) {
    display: block;
    transform: rotate(135deg);
    opacity: 1;
    margin-top: -3px;
    width: 35px;
    background: #29cda7;
    box-shadow: 0 0 2em 0.2em #29cda7;
}

.menu-btn-two input:checked~span:nth-child(5) {
    opacity: 0;
    transform: scale(0);
}

.menu-btn-two span:nth-child(3) {
    width: 25px;
    margin-bottom: auto;
}

.menu-btn-two span:nth-child(4) {
    width: 25px;
    opacity: 0;
    margin: 0;
}

.menu-btn-three input:checked~span:nth-child(2) {
    transform: rotate(45deg) translate(4px, 1px);
    background: #f4f726;
    box-shadow: 0 0 2em 0.2em #f4f726;
}

.menu-btn-three input:checked~span:nth-child(3) {
    transform: rotate(-45deg);
    background: #f4f726;
    box-shadow: 0 0 2em 0.2em #f4f726;
}

.menu-btn-three input:checked~span:nth-child(4) {
    display: block;
    transform: rotate(45deg) translate(-4px, 0px);
    background: #f4f726;
    box-shadow: 0 0 2em 0.2em #f4f726;
}

.menu-btn-three span:nth-child(2) {
    width: 20px;
    margin-right: auto;
}

.menu-btn-three span:nth-child(3) {
    width: 40px;
}

.menu-btn-three span:nth-child(4) {
    width: 20px;
    margin-left: auto;
}

Comments